package rentcars2;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yunhe.entity.Cars;
import com.yunhe.it.MobileCodeWS;
import com.yunhe.it.MobileCodeWSSoap;
import com.yunhe.service.CarsService;








public class Tes {
	
	@Test
	public void te(){
		
		//ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");

	//	CarsService carsService =(CarsService) ac.getBean("CarsService");
		//Map<String, Object> conditions =new HashMap<String, Object>();
		
		//carsService.te();
		//List<Map> listCarBymobileCarcodeCarStatic = carsService.listCarBymobileCarcodeCarStatic(conditions);
		/*for (Map map : listCarBymobileCarcodeCarStatic) {
			System.out.println(map.get("carcode"));
		}
		*/

		
		
		
		
		/* int pageNum = 1;// 获取当前查询第几页
>>>>>>> branch 'master' of https://git.oschina.net/zkboger/bwrentcars.git
	     int pageSize = 5;
	     PageHelper.startPage(pageNum, pageSize);
	     List<Map> listCarBymobileCarcodeCarStatic = carsService.listCarBymobileCarcodeCarStatic(conditions);
	     
	     PageInfo<Map> page = new PageInfo<Map>(listCarBymobileCarcodeCarStatic);
	     List<Map> list = page.getList();
	     System.out.println(page.getTotal());
	     
	     
	    for (Map map : list) {
			System.out.println(map.get("addtime"));
		}
	     */
		/*Cars selectByPrimaryKey = carsService.selectByPrimaryKey("00001");
		System.out.println(selectByPrimaryKey.getCarid());*/
		
		/*Map<String, Object> selectCarAndUserByCarId = carsService.selectCarAndUserByCarId("1f64370e-d205-4623-8580-3362ec67224a");
		
		Object object = selectCarAndUserByCarId.get("carprice");
		System.out.println(object.toString());*/
		
		
		
		//生成服务对象
		MobileCodeWS ws =new MobileCodeWS();
		//取得webservice 服务的访问方式
		MobileCodeWSSoap mobileCodeWSSoap = ws.getMobileCodeWSSoap();
		String mobileCodeInfo = mobileCodeWSSoap.getMobileCodeInfo("13520453520", "");
		System.out.println(mobileCodeInfo);
		
	}

}
